Kinetic Curve Simulation Fit

This notebook performs fits of simulated Kinetic Curves for different kinetics parameters. A single template notebook is executed several times, once for each set of parameters.

Boilerplate

The module nbrun.py needs to be in the current folder:


In [1]:
from nbrun import run_notebook

Execute notebooks


In [2]:
nb_name = 'Simulated Kinetic Curve Fit - Template'
out_path = 'out_notebooks'

In [3]:
import numpy as np

8-spot kinetics simulation


In [4]:
params = dict(
    sigma = 0.016,  # experimental 8-spot std. dev.

    time_window =  30,
    time_step   =  5,
    time_start  = -900,
    time_stop   =  900,
    decimation  =  20,
    t0_vary = True,

    true_params = dict(
        tau = 60,           # time constant
        init_value = 0.3,   # initial value (for t < t0) 
        final_value = 0.8,  # final value   (for t -> +inf)
        t0 = 0),            # time origin

    num_sim_cycles = 1000,
    taus = (5, 10, 30, 60))

run_notebook(nb_name, nb_suffix='-out-multi-spot-t0_vary', out_path=out_path,
             nb_kwargs=params)





In [5]:
params = dict(
    sigma = 0.016,  # experimental 8-spot std. dev.

    time_window =  30,
    time_step   =  5,
    time_start  = -900,
    time_stop   =  900,
    decimation  =  20,
    t0_vary = False,

    true_params = dict(
        tau = 60,           # time constant
        init_value = 0.3,   # initial value (for t < t0) 
        final_value = 0.8,  # final value   (for t -> +inf)
        t0 = 0),            # time origin

    num_sim_cycles = 1000,
    taus = (5, 10, 30, 60))

run_notebook(nb_name, nb_suffix='-out-multi-spot-t0_novary', out_path=out_path,
             nb_kwargs=params)




1-spot kinetics simulation

The empirical variance of 1-spot measurements are (see 1-spot bubble-bubble kinetics - Summary):


In [6]:
evar = [6.62, 3.94, 5.3]
np.mean(evar)


Out[6]:
5.2866666666666662

In [7]:
params = dict(
    sigma = 0.053,   # noise std. dev. 

    time_window =  180,
    time_step   =  10,
    time_start  = -900,
    time_stop   =  900,
    decimation  =  20,
    t0_vary = True,

    true_params = dict(
        tau = 60,           # time constant
        init_value = 0.3,   # initial value (for t < t0) 
        final_value = 0.8,  # final value   (for t -> +inf)
        t0 = 0),            # time origin

    num_sim_cycles = 1000,
    taus = (30, 60, 120, 240))

run_notebook(nb_name, nb_suffix='-out-single-spot-t0_vary', out_path=out_path,
             nb_kwargs=params)





In [8]:
params = dict(
    sigma = 0.053,  # noise std. dev. 

    time_window =  180,
    time_step   =  10,
    time_start  = -900,
    time_stop   =  900,
    decimation  =  20,
    t0_vary = False,

    true_params = dict(
        tau = 60,           # time constant
        init_value = 0.3,   # initial value (for t < t0) 
        final_value = 0.8,  # final value   (for t -> +inf)
        t0 = 0),            # time origin

    num_sim_cycles = 1000,
    taus = (30, 60, 120, 240))

run_notebook(nb_name, nb_suffix='-out-single-spot-t0_novary', out_path=out_path,
             nb_kwargs=params)




Conclusions

In the notebooks above, the last multi-panel figure compares the fitting accuracy of each parameter for the simple-exponential and integrated-exponential models for a range of conditions.

In particular, we tested noise levels typical for both multispot and single-spot measurements. For each noise level we performed the model comparison allowing $t_0$ to vary or not.

The conclusion is that, as espected, regardless of the conditions (single- vs multi-spot noise level, varying $t_0$ or not) the integrated exponential model is systematically (and significantly) more accurate in estimating the exponential time constant $\tau$.


In [ ]: